<!DOCTYPE html>
<html lang="en">
<head>
    <title></title>
    <meta charset="UTF-8">
    <style>

        #father #son {
            color: blue;
        }

        #father p.c2 {
            color: black;
        }

        div.c1 p.c2 {
            color: red;
        }
        /*继承*/
        #father {
            color: green !important;
        }
        /*继承*/
        div#father.c1 {
            color: yellow;
        }
    </style>
</head>
<body>
<div id="father" class="c1">
    <p id="son" class="c2">
        这行文本是什么颜色的？
    </p>
</div>
</body>
</html>